<?php

/**
 *
 * @copyright	Copyright 2009-2012   庆丰裕软件工作室
 * @author	Zheng HanWei <315933614@qq.com
 * @link	http://www.qfyu.net/
 *  
 * */
global $config;

$sql="select * from ".TRAINTXT." where id=".$_GET['id'];
$db->query($sql);
$text=$db->fetchRow();

$filename = $config['webroot']."/uploadfile/text/".$text['source'];    //要下载的文件名
 
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=".basename($filename));  
readfile($filename);
?>
